import QtQuick 2.0

Rectangle {

    id: root

    property string title: ""
    property bool onHold: false


    height: onHold ? 3 : 2;  width: parent.width
    z: onHold ? 1 : 0

    Item{
        visible: onHold
        x: 5*dp;  y: -this.height - 2*dp
        height: 28*dp
        width: 22*dp + text_value.contentWidth + 10*dp
        Rectangle{
            radius: 3*dp
            color: "#333333"
            opacity: 0.8
            anchors.fill: parent
        }
        Rectangle{
            height: 8*dp; width: 8*dp
            x: 10*dp; y: 10*dp
            color: root.color
            radius: 4*dp
        }
        Text{
            id: text_value
            text: title
            font.pixelSize: config.fontsize
            x: 22*dp
            color: "white"
            anchors.verticalCenter: parent.verticalCenter
        }
    }
}
